package define

import (
	"time"
)

const (
	//RenewalPrefixLabel      = "heartbeat."
	LogDataPrefixLabel      = "logData."
	MetricsPrefixLabel      = "metricsData."
	TracePrefixLabel        = "trace."
	ResourceInfoPrefixLabel = "resourceInfo."
	StatusPrefixLabel       = "status."
)

//type DataPut struct {
//	Guid  string `json:"guid" yaml:"guid"`
//	Key   string `json:"key" yaml:"key"`
//	Value string `json:"value" yaml:"value"`
//}
//
//type DataGet struct {
//	Guid string `json:"guid"`
//	Key  string `json:"key" yaml:"key"`
//}

type QueryHistoryMetrics struct {
	Start       time.Time              `json:"start" yaml:"start"`
	End         time.Time              `json:"end" yaml:"end"`
	Entities    []string               `json:"entities" yaml:"entities"`
	Metrics     map[string]string      `json:"metrics" yaml:"metrics"`
	Aggregation map[string]interface{} `json:"aggregation" yaml:"aggregation"`
}

type QueryHistoryMetricsResponse struct {
	TimeScale []time.Time          `json:"timeScale" yaml:"timeScale"`
	Data      map[string][]Metrics `json:"data" yaml:"data"`
}

type QueryActualMetrics struct {
	Metrics  map[string]string `json:"metrics" yaml:"metrics"`
	Entities []string          `json:"entities" yaml:"entities"`
}

type QueryActualMetricsResponse struct {
	Time time.Time          `json:"time" yaml:"time"`
	Data map[string]Metrics `json:"data" yaml:"data"`
}

type QueryHistoryLogs struct {
	Start    time.Time         `json:"start" yaml:"start"`
	End      time.Time         `json:"end" yaml:"end"`
	Entities []string          `json:"entities" yaml:"entities"`
	Filters  map[string]string `json:"filters" yaml:"filters"`
	Sort     map[string]string `json:"sort" yaml:"sort"`
}

type QueryHistoryLogsResponse struct {
	Data map[string][]string `json:"data" yaml:"data"`
}

type Resource struct {
	CpuRes CpuRes `json:"cpuRes" yaml:"cpuRes"`
	NetRes NetRes `json:"netRes" yaml:"netRes"`
}

type CpuRes struct {
	CpuSet    string `json:"cpuSet" yaml:"cpuSet"`
	CpuWeight int    `json:"cpuWeight" yaml:"cpuWeight"`
	CpuShare  int    `json:"cpuShare" yaml:"cpuShare"`
}

type NetRes struct {
	NetUploadBandwidth string `json:"netUploadBandwidth" yaml:"netUploadBandwidth"`
	NetLatency         string `json:"netLatency" yaml:"netLatency"`
	NetBrust           uint32 `json:"netBrust" yaml:"netBrust"`
}
